home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / emacs-complete / fsf / emacs / info / emacs-15 < prev    next >
Encoding:
GNU Info File  |  1994-10-06  |  48.3 KB  |  1,197 lines

  1. This is Info file ../info/emacs, produced by Makeinfo-1.54 from the
  2. input file emacs.texi.
  3.  
  4. 
  5. File: emacs,  Node: Mayan Calendar,  Prev: From Other Calendar,  Up: Other Calendars
  6.  
  7. Converting from the Mayan Calendar
  8. ----------------------------------
  9.  
  10.    Here are the commands to select dates based on the Mayan calendar:
  11.  
  12. `g m l'
  13.      Move to a date specified by the long count calendar
  14.      (`calendar-goto-mayan-long-count-date').
  15.  
  16. `g m n t'
  17.      Move to the next occurrence of a place in the tzolkin calendar
  18.      (`calendar-next-tzolkin-date').
  19.  
  20. `g m p t'
  21.      Move to the previous occurrence of a place in the tzolkin calendar
  22.      (`calendar-previous-tzolkin-date').
  23.  
  24. `g m n h'
  25.      Move to the next occurrence of a place in the haab calendar
  26.      (`calendar-next-haab-date').
  27.  
  28. `g m p h'
  29.      Move to the previous occurrence of a place in the haab calendar
  30.      (`calendar-previous-haab-date').
  31.  
  32. `g m n c'
  33.      Move to the next occurrence of a place in the calendar round
  34.      (`calendar-next-calendar-round-date').
  35.  
  36. `g m p c'
  37.      Move to the previous occurrence of a place in the calendar round
  38.      (`calendar-previous-calendar-round-date').
  39.  
  40.    To understand these commands, you need to understand the Mayan
  41. calendars.  The "long count" is a counting of days with these units:
  42.  
  43.      1 kin = 1 day   1 uinal = 20 kin   1 tun = 18 uinal
  44.      1 katun = 20 tun   1 baktun = 20 katun
  45.  
  46. Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
  47. tun, 16 uinal, and 6 kin.  The Emacs calendar can handle Mayan long
  48. count dates as early as 7.17.18.13.1, but no earlier.  When you use the
  49. `g m l' command, type the Mayan long count date with the baktun, katun,
  50. tun, uinal, and kin separated by periods.
  51.  
  52.    The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
  53. independent cycles of 13 and 20 days.  Since this cycle repeats
  54. endlessly, Emacs provides commands to move backward and forward to the
  55. previous or next point in the cycle.  Type `g m p t' to go to the
  56. previous tzolkin date; Emacs asks you for a tzolkin date and moves point
  57. to the previous occurrence of that date.  Similarly, type `g m n t' to
  58. go to the next occurrence of a tzolkin date.
  59.  
  60.    The Mayan haab calendar is a cycle of 365 days arranged as 18 months
  61. of 20 days each, followed a 5-day monthless period.  Like the tzolkin
  62. cycle, this cycle repeats endlessly, and there are commands to move
  63. backward and forward to the previous or next point in the cycle.  Type
  64. `g m p h' to go to the previous haab date; Emacs asks you for a haab
  65. date and moves point to the previous occurrence of that date.
  66. Similarly, type `g m n h' to go to the next occurrence of a haab date.
  67.  
  68.    The Maya also used the combination of the tzolkin date and the haab
  69. date.  This combination is a cycle of about 52 years called a *calendar
  70. round*.  If you type `g m p c', Emacs asks you for both a haab and a
  71. tzolkin date and then moves point to the previous occurrence of that
  72. combination.  Use `g m p c' to move point to the next occurrence of a
  73. combination.  These commands signal an error if the haab/tzolkin date
  74. combination you have typed is impossible.
  75.  
  76.    Emacs uses strict completion (*note Strict Completion::.) whenever it
  77. asks you to type a Mayan name, so you don't have to worry about
  78. spelling.
  79.  
  80. 
  81. File: emacs,  Node: Diary,  Next: Appointments,  Prev: Other Calendars,  Up: Calendar/Diary
  82.  
  83. The Diary
  84. =========
  85.  
  86.    The Emacs diary keeps track of appointments or other events on a
  87. daily basis, in conjunction with the calendar.  To use the diary
  88. feature, you must first create a "diary file" containing a list of
  89. events and their dates.  Then Emacs can automatically pick out and
  90. display the events for today, for the immediate future, or for any
  91. specified date.
  92.  
  93.    By default, Emacs uses `~/diary' as the diary file.  This is the
  94. same file that the `calendar' utility uses.  A sample `~/diary' file is:
  95.  
  96.      12/22/1988  Twentieth wedding anniversary!!
  97.      &1/1.       Happy New Year!
  98.      10/22       Ruth's birthday.
  99.      * 21, *:    Payday
  100.      Tuesday--weekly meeting with grad students at 10am
  101.               Supowit, Shen, Bitner, and Kapoor to attend.
  102.      1/13/89     Friday the thirteenth!!
  103.      &thu 4pm    squash game with Lloyd.
  104.      mar 16      Dad's birthday
  105.      April 15, 1989 Income tax due.
  106.      &* 15       time cards due.
  107.  
  108. This example uses extra spaces to align the event descriptions of most
  109. of the entries.  Such formatting is purely a matter of taste.
  110.  
  111.    Although you probably will start by creating a diary manually, Emacs
  112. provides a number of commands to let you view, add, and change diary
  113. entries.
  114.  
  115. * Menu:
  116.  
  117. * Diary Commands::         Viewing diary entries and associated calendar dates.
  118. * Format of Diary File::   Entering events in your diary.
  119. * Date Formats::       Various ways you can specify dates.
  120. * Adding to Diary::       Commands to create diary entries.
  121. * Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
  122.  
  123. 
  124. File: emacs,  Node: Diary Commands,  Next: Format of Diary File,  Up: Diary
  125.  
  126. Commands Displaying Diary Entries
  127. ---------------------------------
  128.  
  129.    Once you have created a `~/diary' file, you can use the calendar to
  130. view it.  You can also view today's events outside of Calendar mode.
  131.  
  132. `d'
  133.      Display all diary entries for the selected date
  134.      (`view-diary-entries').
  135.  
  136. `Mouse-2 Diary'
  137.      Display all diary entries for the date you click on.
  138.  
  139. `s'
  140.      Display the entire diary file (`show-all-diary-entries').
  141.  
  142. `m'
  143.      Mark all visible dates that have diary entries
  144.      (`mark-diary-entries').
  145.  
  146. `u'
  147.      Unmark the calendar window (`calendar-unmark').
  148.  
  149. `M-x print-diary-entries'
  150.      Print hard copy of the diary display as it appears.
  151.  
  152. `M-x diary'
  153.      Display all diary entries for today's date.
  154.  
  155.    Displaying the diary entries with `d' shows in a separate window the
  156. diary entries for the selected date in the calendar.  The mode line of
  157. the new window shows the date of the diary entries and any holidays
  158. that fall on that date.  If you specify a numeric argument with `d', it
  159. shows all the diary entries for that many successive days.  Thus, `2 d'
  160. displays all the entries for the selected date and for the following
  161. day.
  162.  
  163.    Another way to display the diary entries for a date is to click
  164. `Mouse-2' on the date, and then choose `Diary' from the menu that
  165. appears.
  166.  
  167.    To get a broader view of which days are mentioned in the diary, use
  168. the `m' command.  This displays the dates that have diary entries fall
  169. in a different face (or places a `+' after these dates, if display with
  170. multiple faces is not available).  The command applies both to the
  171. currently visible months and to other months that subsequently become
  172. visible by scrolling.  To turn marking off and erase the current marks,
  173. type `u', which also turns off holiday marks (*note Holidays::.).
  174.  
  175.    To see the full diary file, rather than just some of the entries, use
  176. the `s' command.
  177.  
  178.    Display of selected diary entries uses the selective display feature
  179. to hide entries that don't apply.  This is the same feature that Outline
  180. mode uses to show part of an outline (*note Outline Mode::.).
  181.  
  182.    The diary buffer as you see it is an illusion, so simply printing the
  183. buffer does not print what you see on your screen.  There is a special
  184. command to print hard copy of the diary buffer *as it appears*; this
  185. command is `M-x print-diary-entries'.  It sends the data directly to
  186. the printer.  You can customize it like `lpr-region' (*note
  187. Hardcopy::.).
  188.  
  189.    The command `M-x diary' displays the diary entries for the current
  190. date, independently of the calendar display, and optionally for the next
  191. few days as well; the variable `number-of-diary-entries' specifies how
  192. many days to include.  *Note Calendar/Diary Options:
  193. (elisp)Calendar/Diary Options.
  194.  
  195.    If you put `(diary)' in your `.emacs' file, this automatically
  196. displays a window with the day's diary entries, when you enter Emacs.
  197. The mode line of the displayed window shows the date and any holidays
  198. that fall on that date.
  199.  
  200. 
  201. File: emacs,  Node: Format of Diary File,  Next: Date Formats,  Prev: Diary Commands,  Up: Diary
  202.  
  203. The Diary File
  204. --------------
  205.  
  206.    Your "diary file" is a file that records events associated with
  207. particular dates.  The name of the diary file is specified by the
  208. variable `diary-file'; `~/diary' is the default.  The `calendar'
  209. utility program supports a subset of the format allowed by the Emacs
  210. diary facilities, so you can use that utility to view the diary file,
  211. with reasonable results aside from the entries it cannot understand.
  212.  
  213.    Each entry in the diary file describes one event and consists of one
  214. or more lines.  An entry always begins with a date specification at the
  215. left margin.  The rest of the entry is simply text to describe the
  216. event.  If the entry has more than one line, then the lines after the
  217. first must begin with whitespace to indicate they continue a previous
  218. entry.  Lines that do not begin with valid dates and do not continue a
  219. preceding entry are ignored.
  220.  
  221.    You can inhibit the marking of certain diary entries in the calendar
  222. window; to do this, insert an ampersand (`&') at the beginning of the
  223. entry, before the date.  This has no effect on display of the entry in
  224. the diary window; it affects only marks on dates in the calendar
  225. window.  Nonmarking entries are especially useful for generic entries
  226. that would otherwise mark many different dates.
  227.  
  228.    If the first line of a diary entry consists only of the date or day
  229. name with no following blanks or punctuation, then the diary window
  230. display doesn't include that line; only the continuation lines appear.
  231. For example, this entry:
  232.  
  233.      02/11/1989
  234.            Bill B. visits Princeton today
  235.            2pm Cognitive Studies Committee meeting
  236.            2:30-5:30 Liz at Lawrenceville
  237.            4:00pm Dentist appt
  238.            7:30pm Dinner at George's
  239.            8:00-10:00pm concert
  240.  
  241. appears in the diary window without the date line at the beginning.
  242. This style of entry looks neater when you display just a single day's
  243. entries, but can cause confusion if you ask for more than one day's
  244. entries.
  245.  
  246.    You can edit the diary entries as they appear in the window, but it
  247. is important to remember that the buffer displayed contains the *entire*
  248. diary file, with portions of it concealed from view.  This means, for
  249. instance, that the `C-f' (`forward-char') command can put point at what
  250. appears to be the end of the line, but what is in reality the middle of
  251. some concealed line.
  252.  
  253.    *Be careful when editing the diary entries!*  Inserting additional
  254. lines or adding/deleting characters in the middle of a visible line
  255. cannot cause problems, but editing at the end of a line may not do what
  256. you expect.  Deleting a line may delete other invisible entries that
  257. follow it.  Before editing the diary, it is best to display the entire
  258. file with `s' (`show-all-diary-entries').
  259.  
  260. 
  261. File: emacs,  Node: Date Formats,  Next: Adding to Diary,  Prev: Format of Diary File,  Up: Diary
  262.  
  263. Date Formats
  264. ------------
  265.  
  266.    Here are some sample diary entries, illustrating different ways of
  267. formatting a date.  The examples all show dates in American order
  268. (month, day, year), but Calendar mode supports European order (day,
  269. month, year) as an option.
  270.  
  271.      4/20/93  Switch-over to new tabulation system
  272.      apr. 25  Start tabulating annual results
  273.      4/30  Results for April are due
  274.      */25  Monthly cycle finishes
  275.      Friday  Don't leave without backing up files
  276.  
  277.    The first entry appears only once, on April 20, 1993.  The second and
  278. third appear every year on the specified dates, and the fourth uses a
  279. wildcard (asterisk) for the month, so it appears on the 25th of every
  280. month.  The final entry appears every week on Friday.
  281.  
  282.    You can use just numbers to express a date, as in `MONTH/DAY' or
  283. `MONTH/DAY/YEAR'.  This must be followed by a nondigit.  In the date
  284. itself, MONTH and DAY are numbers of one or two digits.  The optional
  285. YEAR is also a number, and may be abbreviated to the last two digits;
  286. that is, you can use `11/12/1989' or `11/12/89'.
  287.  
  288.    Dates can also have the form `MONTHNAME DAY' or `MONTHNAME DAY,
  289. YEAR', where the month's name can be spelled in full or abbreviated to
  290. three characters (with or without a period).  Case is not significant.
  291.  
  292.    A date may be "generic"; that is, partially unspecified.  Then the
  293. entry applies to all dates that match the specification.  If the date
  294. does not contain a year, it is generic and applies to any year.
  295. Alternatively, MONTH, DAY, or YEAR can be a `*'; this matches any
  296. month, day, or year, respectively.  Thus, a diary entry `3/*/*' matches
  297. any day in March of any year; so does `march *'.
  298.  
  299.    If you prefer the European style of writing dates--in which the day
  300. comes before the month--type `M-x european-calendar' while in the
  301. calendar, or set the variable `european-calendar-style' to `t' *before*
  302. using any calendar or diary command.  This mode interprets all dates in
  303. the diary in the European manner, and also uses European style for
  304. displaying diary dates.  (Note that there is no comma after the
  305. MONTHNAME in the European style.)  To go back to the (default) American
  306. style of writing dates, type `M-x american-calendar'.
  307.  
  308.    You can use the name of a day of the week as a generic date which
  309. applies to any date falling on that day of the week.  You can abbreviate
  310. the day of the week to three letters (with or without a period) or spell
  311. it in full; case is not significant.
  312.  
  313. 
  314. File: emacs,  Node: Adding to Diary,  Next: Special Diary Entries,  Prev: Date Formats,  Up: Diary
  315.  
  316. Commands to Add to the Diary
  317. ----------------------------
  318.  
  319.    While in the calendar, there are several commands to create diary
  320. entries:
  321.  
  322. `i d'
  323.      Add a diary entry for the selected date (`insert-diary-entry').
  324.  
  325. `i w'
  326.      Add a diary entry for the selected day of the week
  327.      (`insert-weekly-diary-entry').
  328.  
  329. `i m'
  330.      Add a diary entry for the selected day of the month
  331.      (`insert-monthly-diary-entry').
  332.  
  333. `i y'
  334.      Add a diary entry for the selected day of the year
  335.      (`insert-yearly-diary-entry').
  336.  
  337.    You can make a diary entry for a specific date by selecting that date
  338. in the calendar window and typing the `i d' command.  This command
  339. displays the end of your diary file in another window and inserts the
  340. date; you can then type the rest of the diary entry.
  341.  
  342.    If you want to make a diary entry that applies to a specific day of
  343. the week, select that day of the week (any occurrence will do) and type
  344. `i w'.  This inserts the day-of-week as a generic date; you can then
  345. type the rest of the diary entry.  You can make a monthly diary entry in
  346. the same fashion.  Select the day of the month, use the `i m' command,
  347. and type rest of the entry.  Similarly, you can insert a yearly diary
  348. entry with the `i y' command.
  349.  
  350.    All of the above commands make marking diary entries by default.  To
  351. make a nonmarking diary entry, give a numeric argument to the command.
  352. For example, `C-u i w' makes a nonmarking weekly diary entry.
  353.  
  354.    When you modify the diary file, be sure to save the file before
  355. exiting Emacs.
  356.  
  357. 
  358. File: emacs,  Node: Special Diary Entries,  Prev: Adding to Diary,  Up: Diary
  359.  
  360. Special Diary Entries
  361. ---------------------
  362.  
  363.    In addition to entries based on calendar dates, the diary file can
  364. contain "special entries" for regular events such as anniversaries.
  365. These entries are based on Lisp expressions (sexps) that Emacs evaluates
  366. as it scans the diary file.  Instead of a date, a special entry contains
  367. `%%' followed by a Lisp expression which must begin and end with
  368. parentheses.  The Lisp expression determines which dates the entry
  369. applies to.
  370.  
  371.    Calendar mode provides commands to insert certain commonly used
  372. special entries:
  373.  
  374. `i a'
  375.      Add an anniversary diary entry for the selected date
  376.      (`insert-anniversary-diary-entry').
  377.  
  378. `i b'
  379.      Add a block diary entry for the current region
  380.      (`insert-block-diary-entry').
  381.  
  382. `i c'
  383.      Add a cyclic diary entry starting at the date
  384.      (`insert-cyclic-diary-entry').
  385.  
  386.    If you want to make a diary entry that applies to the anniversary of
  387. a specific date, move point to that date and use the `i a' command.
  388. This displays the end of your diary file in another window and inserts
  389. the anniversary description; you can then type the rest of the diary
  390. entry.  The entry looks like this:
  391.  
  392.      %%(diary-anniversary 10 31 1948) Arthur's birthday
  393.  
  394. This entry applies to October 31 in any year after 1948; `10 31 1948'
  395. specifies the date.  (If you are using the European calendar style, the
  396. month and day are interchanged.)  The reason this expression requires a
  397. beginning year is that advanced diary functions can use it to calculate
  398. the number of elapsed years.
  399.  
  400.    A "block" diary entry applies to a specified range of consecutive
  401. dates.  Here is a block diary entry that applies to all dates from June
  402. 24, 1990 through July 10, 1990:
  403.  
  404.      %%(diary-block 6 24 1990 7 10 1990) Vacation
  405.  
  406. The `6 24 1990' indicates the starting date and the `7 10 1990'
  407. indicates the stopping date.  (Again, if you are using the European
  408. calendar style, the month and day are interchanged.)
  409.  
  410.    To insert a block entry, place point and the mark on the two dates
  411. that begin and end the range, and type `i b'.  This command displays
  412. the end of your diary file in another window and inserts the block
  413. description; you can then type the diary entry.
  414.  
  415.    "Cyclic" diary entries repeat after a fixed interval of days.  To
  416. create one, select the starting date and use the `i c' command.  The
  417. command prompts for the length of interval, then inserts the entry,
  418. which looks like this:
  419.  
  420.      %%(diary-cyclic 50 3 1 1990) Renew medication
  421.  
  422. This entry applies to March 1, 1990 and every 50th day following; `3 1
  423. 1990' specifies the starting date.  (If you are using the European
  424. calendar style, the month and day are interchanged.)
  425.  
  426.    All three of these commands make marking diary entries.  To insert a
  427. nonmarking entry, give a numeric argument to the command.  For example,
  428. `C-u i a' makes a nonmarking anniversary diary entry.
  429.  
  430.    Marking sexp diary entries in the calendar is *extremely*
  431. time-consuming, since every date visible in the calendar window must be
  432. individually checked.  So it's a good idea to make sexp diary entries
  433. nonmarking (with `&') when possible.
  434.  
  435.    Another sophisticated kind of sexp entry, a "floating" diary entry,
  436. specifies a regularly-occurring event by offsets specified in days,
  437. weeks, and months.  It is comparable to a crontab entry interpreted by
  438. the `cron' utility.  Here is a nonmarking, floating diary entry that
  439. applies to the last Thursday in November:
  440.  
  441.      &%%(diary-float 11 4 -1) American Thanksgiving
  442.  
  443. The 11 specifies November (the eleventh month), the 4 specifies Thursday
  444. (the fourth day of the week, where Sunday is numbered zero), and the -1
  445. specifies "last" (1 would mean "first", 2 would mean "second", -2 would
  446. mean "second-to-last", and so on).  The month can be a single month or
  447. a list of months.  Thus you could change the 11 above to `'(1 2 3)' and
  448. have the entry apply to the last Thursday of January, February, and
  449. March.  If the month is `t', the entry applies to all months of the
  450. year.
  451.  
  452.    Most generally, special diary entries can perform arbitrary
  453. computations to determine when they apply.  *Note Sexp Diary Entries:
  454. (elisp)Sexp Diary Entries.
  455.  
  456. 
  457. File: emacs,  Node: Appointments,  Next: Daylight Savings,  Prev: Diary,  Up: Calendar/Diary
  458.  
  459. Appointments
  460. ============
  461.  
  462.    If you have a diary entry for an appointment, and that diary entry
  463. begins with a recognizable time of day, Emacs can warn you, several
  464. minutes beforehand, that that appointment is pending.  Emacs alerts you
  465. to the appointment by displaying a message in the mode line.
  466.  
  467.    To enable appointment notification, you must enable the time display
  468. feature of Emacs, `M-x display-time' (*note Mode Line::.).  You must
  469. also add the function `appt-make-list' to the `diary-hook', like this:
  470.  
  471.      (add-hook 'diary-hook 'appt-make-list)
  472.  
  473.    With these preparations done, when you display the diary (either with
  474. the `d' command in the calendar window or with the `M-x diary'
  475. command), it sets up an appointment list of all the diary entries found
  476. with recognizable times of day, and reminds you just before each of
  477. them.
  478.  
  479.    For example, suppose the diary file contains these lines:
  480.  
  481.      Monday
  482.        9:30am Coffee break
  483.       12:00pm Lunch
  484.  
  485. Then on Mondays, after you have displayed the diary, you will be
  486. reminded at 9:20am about your coffee break and at 11:50am about lunch.
  487.  
  488.    You can write times in conventional American am/pm style, or 24-hour
  489. European/military style.  You need not be consistent; your diary file
  490. can have a mixture of the two styles.
  491.  
  492.    Emacs updates the appointments list automatically just after
  493. midnight.  This also displays the next day's diary entries in the diary
  494. buffer, unless you set `appt-display-diary' to `nil'.
  495.  
  496.    You can also use the appointment notification facility like an alarm
  497. clock.  The command `M-x appt-add' adds entries to the appointment list
  498. without affecting your diary file.  You delete entries from the
  499. appointment list with `M-x appt-delete'.
  500.  
  501.    You can turn off the appointment notification feature at any time by
  502. setting `appt-issue-message' to `nil'.
  503.  
  504. 
  505. File: emacs,  Node: Daylight Savings,  Prev: Appointments,  Up: Calendar/Diary
  506.  
  507. Daylight Savings Time
  508. =====================
  509.  
  510.    Emacs understands the difference between standard time and daylight
  511. savings time--the times given for sunrise, sunset, solstices,
  512. equinoxes, and the phases of the moon take that into account.  The rules
  513. for daylight savings time vary from place to place and have also varied
  514. historically from year to year.  To do the job properly, Emacs needs to
  515. know which rules to use.
  516.  
  517.    Some operating systems keep track of the rules that apply to the
  518. place where you are; on these systems, Emacs gets the information it
  519. needs from the system automatically.  If some or all of this
  520. information is missing, Emacs fills in the gaps with the rules
  521. currently used in Cambridge, Massachusetts.  If the resulting rules are
  522. not what you want, you can tell Emacs the rules to use by setting
  523. certain variables.
  524.  
  525.    These values should be Lisp expressions that refer to the variable
  526. `year', and evaluate to the Gregorian date on which daylight savings
  527. time starts or (respectively) ends, in the form of a list `(MONTH DAY
  528. YEAR)'.  The values should be `nil' if your area does not use daylight
  529. savings time.
  530.  
  531.    Emacs uses these expressions to determine the starting date of
  532. daylight savings time for the holiday list and for correcting times of
  533. day in the solar and lunar calculations.
  534.  
  535.    The values for Cambridge, Massachusetts are as follows:
  536.  
  537.      (calendar-nth-named-day 1 0 4 year)
  538.      (calendar-nth-named-day -1 0 10 year)
  539.  
  540. That is, the first 0th day (Sunday) of the fourth month (April) in the
  541. year specified by `year', and the last Sunday of the tenth month
  542. (October) of that year.  If daylight savings time were changed to start
  543. on October 1, you would set `calendar-daylight-savings-starts' to this:
  544.  
  545.      (list 10 1 year)
  546.  
  547.    If there is no daylight savings time at your location, or if you want
  548. all times in standard time, set `calendar-daylight-savings-starts' and
  549. `calendar-daylight-savings-ends' to `nil'.
  550.  
  551.    The variable `calendar-daylight-time-offset' specifies the
  552. difference between daylight savings time and standard time, measured in
  553. minutes.  The value for Cambridge, Massachusetts is 60.
  554.  
  555.    The two variables `calendar-daylight-savings-starts-time' and
  556. `calendar-daylight-savings-ends-time' specify the number of minutes
  557. after midnight local time when the transition to and from daylight
  558. savings time should occur.  For Cambridge, both variables' values are
  559. 120.
  560.  
  561. 
  562. File: emacs,  Node: GNUS,  Next: Shell,  Prev: Calendar/Diary,  Up: Top
  563.  
  564. GNUS
  565. ====
  566.  
  567.    GNUS is an Emacs subsystem for reading and responding to netnews.
  568. You can use GNUS to browse through news groups, look at summaries of
  569. articles in specific group, and read articles of interest.  You can
  570. respond to authors or write replies to all the readers of a news group.
  571.  
  572.    This section introduces GNUS and describes several basic features.
  573. Full documentation will appear elsewhere.
  574.  
  575.    To start GNUS, type `M-x gnus RET'.
  576.  
  577. * Menu:
  578.  
  579. * Buffers of GNUS::       The Newsgroups, Summary and Article buffers.
  580. * GNUS Startup::       What you should know about starting GNUS.
  581. * Summary of GNUS::       A short description of the basic GNUS commands.
  582.  
  583. 
  584. File: emacs,  Node: Buffers of GNUS,  Next: GNUS Startup,  Up: GNUS
  585.  
  586. GNUS's Three Buffers
  587. --------------------
  588.  
  589.    GNUS creates and uses three Emacs buffers, each with its own
  590. particular purpose and its own major mode.
  591.  
  592.    The "Newsgroup buffer" contains a list of newsgroups.  This is the
  593. first buffer that GNUS displays when it starts up.  Normally the list
  594. contains only the newsgroups to which you subscribe (which are listed in
  595. your `.newsrc' file) and which contain unread articles.  Use this
  596. buffer to select a specific newsgroup.
  597.  
  598.    The "Summary buffer" lists the articles in a single newsgroup,
  599. including their subjects, their numbers, and who posted them.  GNUS
  600. creates a Summary buffer for a newsgroup when you select the group in
  601. the Newsgroup buffer.  Use this buffer to select an article.
  602.  
  603.    The "Article buffer" displays the text of an article.  You rarely
  604. need to select this buffer because you can scroll through it while
  605. remaining in the Summary buffer.
  606.  
  607. 
  608. File: emacs,  Node: GNUS Startup,  Next: Summary of GNUS,  Prev: Buffers of GNUS,  Up: GNUS
  609.  
  610. When GNUS Starts Up
  611. -------------------
  612.  
  613.    At startup, GNUS reads your `.newsrc' news initialization file and
  614. attempts to communicate with the local news server, which is a
  615. repository of news articles.  The news server need not be the same
  616. computer you are logged in on.
  617.  
  618.    If you start GNUS and connect to the server, but do not see any
  619. newsgroups listed in the Newsgroup buffer, type `L' to get a listing of
  620. all the newsgroups.  Then type `u' to unsubscribe from the newsgroups
  621. you don't want to read.  (You can move point to a particular group
  622. using `n' and `p' or the usual Emacs commands.)
  623.  
  624.    When you quit GNUS with `q', it automatically records in your
  625. `.newsrc' initialization file the subscribed or unsubscribed status of
  626. all newsgroups, except for groups you have "killed".  (You do not need
  627. to edit this file yourself, but you may.)  When new newsgroups come
  628. into existence, GNUS subscribes to them automatically; if you don't
  629. want to read them, use `u' to unsubscribe from them.
  630.  
  631. 
  632. File: emacs,  Node: Summary of GNUS,  Prev: GNUS Startup,  Up: GNUS
  633.  
  634. Summary of GNUS Commands
  635. ------------------------
  636.  
  637.    Reading news is a two step process:
  638.  
  639.   1. Choose a newsgroup in the Newsgroup buffer.
  640.  
  641.   2. Select articles from the Summary buffer.  Each article selected is
  642.      displayed in the Article buffer in a large window, below the
  643.      Summary buffer in its small window.
  644.  
  645.    Each GNUS buffer has its own special commands, but commands that do
  646. the similar things have similar key bindings.  Here are commands for the
  647. Newsgroup and Summary buffers:
  648.  
  649. `z'
  650.      In the Newsgroup buffer, suspend GNUS.  You can return to GNUS
  651.      later by selecting the Newsgroup buffer and typing `g' to get
  652.      newly arrived articles.
  653.  
  654. `q'
  655.      In the Newsgroup buffer, update your `.newsrc' initialization file
  656.      and quit GNUS.
  657.  
  658.      In the Summary buffer, exit the current newsgroup and return to the
  659.      Newsgroup buffer.  Thus, typing `q' twice quits GNUS.
  660.  
  661. `L'
  662.      In the Newsgroup buffer, list all the newsgroups available on your
  663.      news server (except those you have killed).  This may be a long
  664.      list!
  665.  
  666. `l'
  667.      In the Newsgroup buffer, list only the newsgroups to which you
  668.      subscribe and which contain unread articles.
  669.  
  670. `u'
  671.      In the Newsgroup buffer, unsubscribe from (or subscribe to) the
  672.      newsgroup listed in the line that point is on.  When you quit GNUS
  673.      by typing `q', GNUS lists in your `.newsrc' file which groups you
  674.      have subscribed to.  The next time you start GNUS, you won't see
  675.      this group initially, because GNUS normally displays only
  676.      subscribed-to groups.
  677.  
  678. `C-k'
  679.      In the Newsgroup buffer, "kill" the current line's newsgroup--don't
  680.      even list it in `.newsrc' from now on.  This affects future GNUS
  681.      sessions as well as the present session.
  682.  
  683.      When you quit GNUS by typing `q', GNUS writes information in the
  684.      file `.newsrc' describing all newsgroups except those you have
  685.      "killed."
  686.  
  687. `SPC'
  688.      In the Newsgroup buffer, select the group on the line under the
  689.      cursor and display the first unread article in that group.
  690.  
  691.      In the Summary buffer,
  692.  
  693.         * Select the article on the line under the cursor if none is
  694.           selected.
  695.  
  696.         * Scroll the text of the selected article (if there is one).
  697.  
  698.         * Select the next unread article if at the end of the current
  699.           article.
  700.  
  701.      Thus, you can move through all the articles by repeatedly typing
  702.      SPC.
  703.  
  704. `DEL'
  705.      In the Newsgroup Buffer, move point to the previous newsgroup
  706.      containing unread articles.
  707.  
  708.      In the Summary buffer, scroll the text of the article backwards.
  709.  
  710. `n'
  711.      Move point to the next unread newsgroup, or select the next unread
  712.      article.
  713.  
  714. `p'
  715.      Move point to the previous unread newsgroup, or select the previous
  716.      unread article.
  717.  
  718. `C-n'
  719. `C-p'
  720.      Move point to the next or previous item, even if it is marked as
  721.      read.  This does not select the article or newsgroup on that line.
  722.  
  723. `s'
  724.      In the Summary buffer, do an incremental search of the current
  725.      text in the Article buffer, just as if you switched to the Article
  726.      buffer and typed `C-s'.
  727.  
  728. `M-s REGEXP RET'
  729.      In the Summary buffer, search forward for articles containing a
  730.      match for REGEXP.
  731.  
  732. `C-c C-s C-n'
  733. `C-c C-s C-s'
  734. `C-c C-s C-d'
  735. `C-c C-s C-a'
  736.      In the Summary buffer, sort the list of articles by number,
  737.      subject, date, or author.
  738.  
  739. `C-M-n'
  740. `C-M-p'
  741.      In the Summary buffer, read the next or previous article with the
  742.      same subject as the current article.
  743.  
  744. 
  745. File: emacs,  Node: Shell,  Next: Emacs Server,  Prev: GNUS,  Up: Top
  746.  
  747. Running Shell Commands from Emacs
  748. =================================
  749.  
  750.    Emacs has commands for passing single command lines to inferior shell
  751. processes; it can also run a shell interactively with input and output
  752. to an Emacs buffer named `*shell*'.
  753.  
  754. `M-! CMD RET'
  755.      Run the shell command line CMD and display the output
  756.      (`shell-command').
  757.  
  758. `M-| CMD RET'
  759.      Run the shell command line CMD with region contents as input;
  760.      optionally replace the region with the output
  761.      (`shell-command-on-region').
  762.  
  763. `M-x shell'
  764.      Run a subshell with input and output through an Emacs buffer.  You
  765.      can then give commands interactively.
  766.  
  767. * Menu:
  768.  
  769. * Single Shell::           How to run one shell command and return.
  770. * Interactive Shell::      Permanent shell taking input via Emacs.
  771. * Shell Mode::             Special Emacs commands used with permanent shell.
  772. * History: Shell History.  Repeating previous commands in a shell buffer.
  773. * Options: Shell Options.  Options for customizing Shell mode.
  774. * Remote Host::            Connecting to another computer.
  775.  
  776. 
  777. File: emacs,  Node: Single Shell,  Next: Interactive Shell,  Up: Shell
  778.  
  779. Single Shell Commands
  780. ---------------------
  781.  
  782.    `M-!' (`shell-command') reads a line of text using the minibuffer
  783. executes it as a shell command in a subshell made just for this
  784. command.  Standard input for the command comes from the null device.
  785. If the shell command produces any output, the output goes into an Emacs
  786. buffer named `*Shell Command Output*', which is displayed in another
  787. window but not selected.  A numeric argument, as in `M-1 M-!', directs
  788. this command to insert any output into the current buffer.  In that
  789. case, point is left before the output and the mark is set after the
  790. output.
  791.  
  792.    If the shell command line ends in `&', it runs asynchronously.
  793.  
  794.    `M-|' (`shell-command-on-region') is like `M-!' but passes the
  795. contents of the region as the standard input to the shell command,
  796. instead of no input.  If a numeric argument is used, meaning insert the
  797. output in the current buffer, then the old region is deleted first and
  798. the output replaces it as the contents of the region.
  799.  
  800.    Both `M-!' and `M-|' use `shell-file-name' to specify the shell to
  801. use.  This variable is initialized based on your `SHELL' environment
  802. variable when Emacs is started.  If the file name does not specify a
  803. directory, the directories in the list `exec-path' are searched; this
  804. list is initialized based on the environment variable `PATH' when Emacs
  805. is started.  Your `.emacs' file can override either or both of these
  806. default initializations.
  807.  
  808.    Both `M-!' and `M-|' wait for the shell command to complete.  To
  809. stop waiting, type `C-g' to quit; that terminates the shell command
  810. with the signal `SIGINT'--the same signal that `C-c' normally generates
  811. in the shell.  Emacs waits until the command actually terminates.  If
  812. the shell command doesn't stop (because it ignores the `SIGINT'
  813. signal), type `C-g' again; this sends the command a `SIGKILL' signal
  814. which is impossible to ignore.
  815.  
  816. 
  817. File: emacs,  Node: Interactive Shell,  Next: Shell Mode,  Prev: Single Shell,  Up: Shell
  818.  
  819. Interactive Inferior Shell
  820. --------------------------
  821.  
  822.    To run a subshell interactively, putting its typescript in an Emacs
  823. buffer, use `M-x shell'.  This creates (or reuses) a buffer named
  824. `*shell*' and runs a subshell with input coming from and output going
  825. to that buffer.  That is to say, any "terminal output" from the subshell
  826. goes into the buffer, advancing point, and any "terminal input" for the
  827. subshell comes from text in the buffer.  To give input to the subshell,
  828. go to the end of the buffer and type the input, terminated by RET.
  829.  
  830.    Emacs does not wait for the subshell to do anything.  You can switch
  831. windows or buffers and edit them while the shell is waiting, or while
  832. it is running a command.  Output from the subshell waits until Emacs
  833. has time to process it; this happens whenever Emacs is waiting for
  834. keyboard input or for time to elapse.
  835.  
  836.    To make multiple subshells, rename the buffer `*shell*' to something
  837. different using `M-x rename-uniquely'.  Then type `M-x shell' again to
  838. create a new buffer `*shell*' with its own subshell.  If you rename
  839. this buffer as well, you can create a third one, and so on.  All the
  840. subshells run independently and in parallel.
  841.  
  842.    The file name used to load the subshell is the value of the variable
  843. `explicit-shell-file-name', if that is non-`nil'.  Otherwise, the
  844. environment variable `ESHELL' is used, or the environment variable
  845. `SHELL' if there is no `ESHELL'.  If the file name specified is
  846. relative, the directories in the list `exec-path' are searched; this
  847. list is initialized based on the environment variable `PATH' when Emacs
  848. is started.  Your `.emacs' file can override either or both of these
  849. default initializations.
  850.  
  851.    As soon as the subshell is started, it is sent as input the contents
  852. of the file `~/.emacs_SHELLNAME', if that file exists, where SHELLNAME
  853. is the name of the file that the shell was loaded from.  For example,
  854. if you use bash, the file sent to it is `~/.emacs_bash'.
  855.  
  856.    `cd', `pushd' and `popd' commands given to the inferior shell are
  857. watched by Emacs so it can keep the `*shell*' buffer's default
  858. directory the same as the shell's working directory.  These commands
  859. are recognized syntactically by examining lines of input that are sent.
  860. If you use aliases for these commands, you can tell Emacs to recognize
  861. them also.  For example, if the value of the variable
  862. `shell-pushd-regexp' matches the beginning of a shell command line,
  863. that line is regarded as a `pushd' command.  Change this variable when
  864. you add aliases for `pushd'.  Likewise, `shell-popd-regexp' and
  865. `shell-cd-regexp' are used to recognize commands with the meaning of
  866. `popd' and `cd'.  These commands are recognized only at the beginning
  867. of a shell command line.
  868.  
  869.    If Emacs gets an error while trying to handle what it believes is a
  870. `cd', `pushd' or `popd' command, it runs the hook
  871. `shell-set-directory-error-hook' (*note Hooks::.).
  872.  
  873.    If Emacs does not properly track changes in the current directory of
  874. the subshell, use the command `M-x dirs' to ask the shell what its
  875. current directory is.  This command works for shells that support the
  876. most common command syntax; it may not work for unusual shells.
  877.  
  878. 
  879. File: emacs,  Node: Shell Mode,  Next: Shell History,  Prev: Interactive Shell,  Up: Shell
  880.  
  881. Shell Mode
  882. ----------
  883.  
  884.    Shell buffer use Shell mode, which defines several special keys
  885. attached to the `C-c' prefix.  They are chosen to resemble the usual
  886. editing and job control characters present in shells that are not under
  887. Emacs, except that you must type `C-c' first.  Here is a complete list
  888. of the special key bindings of Shell mode:
  889.  
  890. `RET'
  891.      At end of buffer send line as input; otherwise, copy current line
  892.      to end of buffer and send it (`comint-send-input').  When a line is
  893.      copied, any text at the beginning of the line that matches the
  894.      variable `shell-prompt-pattern' is left out; this variable's value
  895.      should be a regexp string that matches the prompts that your shell
  896.      uses.
  897.  
  898. `TAB'
  899.      Complete the command name or file name before point in the shell
  900.      buffer (`comint-dynamic-complete').  TAB also completes history
  901.      references (*note History References::.) and environment variable
  902.      names.
  903.  
  904.      The variable `shell-completion-fignore' specifies a list of file
  905.      name extensions to ignore in Shell mode completion.  The default
  906.      setting ignores file names ending in `~', `#' or `%'.  Other
  907.      related Comint modes use the variable `comint-completion-fignore'
  908.      instead.
  909.  
  910. `M-?'
  911.      Display temporarily a list of the possible completions of the file
  912.      name before point in the shell buffer
  913.      (`comint-dynamic-list-filename-completions').
  914.  
  915. `C-d'
  916.      Either delete a character or send EOF
  917.      (`comint-delchar-or-maybe-eof').  Typed at the end of the shell
  918.      buffer, `C-d' sends EOF to the subshell.  Typed at any other
  919.      position in the buffer, `C-d' deletes a character as usual.
  920.  
  921. `C-c C-a'
  922.      Move to the beginning of the line, but after the prompt if any
  923.      (`comint-bol').
  924.  
  925. `C-c C-u'
  926.      Kill all text pending at end of buffer to be sent as input
  927.      (`comint-kill-input').
  928.  
  929. `C-c C-w'
  930.      Kill a word before point (`backward-kill-word').
  931.  
  932. `C-c C-c'
  933.      Interrupt the shell or its current subjob if any
  934.      (`comint-interrupt-subjob').
  935.  
  936. `C-c C-z'
  937.      Stop the shell or its current subjob if any (`comint-stop-subjob').
  938.  
  939. `C-c C-\'
  940.      Send quit signal to the shell or its current subjob if any
  941.      (`comint-quit-subjob').
  942.  
  943. `C-c C-o'
  944.      Kill the last batch of output from a shell command
  945.      (`comint-kill-output').  This is useful if a shell command spews
  946.      out lots of output that just gets in the way.
  947.  
  948. `C-c C-r'
  949. `C-M-l'
  950.      Scroll to display the beginning of the last batch of output at the
  951.      top of the window; also move the cursor there
  952.      (`comint-show-output').
  953.  
  954. `C-c C-e'
  955.      Scroll to put the end of the buffer at the bottom of the window
  956.      (`comint-show-maximum-output').
  957.  
  958. `C-c C-f'
  959.      Move forward across one shell command, but not beyond the current
  960.      line (`shell-forward-command').  The variable
  961.      `shell-command-regexp' specifies how to recognize the end of a
  962.      command.
  963.  
  964. `C-c C-b'
  965.      Move backward across one shell command, but not beyond the current
  966.      line (`shell-backward-command').
  967.  
  968. `M-x dirs'
  969.      Ask the shell what its current directory is, so that Emacs can
  970.      agree with the shell.
  971.  
  972. `M-x send-invisible RET TEXT RET'
  973.      Send TEXT as input to the shell, after reading it without echoing.
  974.      This is useful when a shell command runs a program that asks for
  975.      a password.
  976.  
  977.      Alternatively, you can arrange for Emacs to notice password prompts
  978.      and turn off echoing for them, as follows:
  979.  
  980.           (add-hook `comint-output-filter-functions
  981.                     `comint-watch-for-password-prompt)
  982.  
  983. `M-x comint-continue-subjob'
  984.      Continue the shell process.  This is useful if you accidentally
  985.      suspend the shell process.(1)
  986.  
  987. `M-x shell-strip-ctrl-m'
  988.      Discard all control-m characters from the shell output.
  989.  
  990.    Shell mode also customizes the paragraph commands so that only shell
  991. prompts start new paragraphs.  Thus, a paragraph consists of an input
  992. command plus the output that follows it in the buffer.
  993.  
  994.    Shell mode is a derivative of Comint mode, a general purpose mode for
  995. communicating with interactive subprocesses.  Most of the features of
  996. Shell mode actually come from Comint mode, as you can see from the
  997. command names listed above.  The specialization of Shell mode in
  998. particular include the choice of regular expression for detecting
  999. prompts, the directory tracking feature, and a few user commands.
  1000.  
  1001.    Other Emacs features that use variants of Comint mode include GUD
  1002. (*note Debuggers::.) and `M-x run-lisp' (*note External Lisp::.).
  1003.  
  1004.    You can use `M-x comint-run' to execute any program of your choice
  1005. in a subprocess using unmodified Comint mode--without the
  1006. specializations of Shell mode.
  1007.  
  1008.    ---------- Footnotes ----------
  1009.  
  1010.    (1)  You should not suspend the shell process.  Suspending a subjob
  1011. of the shell is a completely different matter--that is normal practice,
  1012. but you must use the shell to continue the subjob; this command won't
  1013. do it.
  1014.  
  1015. 
  1016. File: emacs,  Node: Shell History,  Next: Shell Options,  Prev: Shell Mode,  Up: Shell
  1017.  
  1018. Shell Command History
  1019. ---------------------
  1020.  
  1021.    Shell buffers support three ways of repeating earlier commands.  You
  1022. can use the same keys used in the minibuffer; these work much as they do
  1023. in the minibuffer, inserting text from prior commands while point
  1024. remains always at the end of the buffer.  You can move through the
  1025. buffer to previous inputs in their original place, then resubmit them or
  1026. copy them to the end.  Or you can use a `!'-style history reference.
  1027.  
  1028. * Menu:
  1029.  
  1030. * Ring: Shell Ring.             Fetching commands from the history list.
  1031. * Copy: Shell History Copying.  Moving to a command and then copying it.
  1032. * History References::          Expanding `!'-style history references.
  1033.  
  1034. 
  1035. File: emacs,  Node: Shell Ring,  Next: Shell History Copying,  Up: Shell History
  1036.  
  1037. Shell History Ring
  1038. ..................
  1039.  
  1040. `M-p'
  1041.      Fetch the next earlier old shell command.
  1042.  
  1043. `M-n'
  1044.      Fetch the next later old shell command.
  1045.  
  1046. `M-r REGEXP RET'
  1047. `M-s REGEXP RET'
  1048.      Search backwards or forwards for old shell commands that match
  1049.      REGEXP.
  1050.  
  1051.    Shell buffers provide a history of previously entered shell
  1052. commands.  To reuse shell commands from the history, use the editing
  1053. commands `M-p', `M-n', `M-r' and `M-s'.  These work just like the
  1054. minibuffer history commands except that they operate on the text at the
  1055. end of the shell buffer, where you would normally insert text to send
  1056. to the shell.
  1057.  
  1058.    `M-p' fetches an earlier shell command to the end of the shell
  1059. buffer.  Successive use of `M-p' fetches successively earlier shell
  1060. commands, each replacing any text that was already present as potential
  1061. shell input.  `M-n' does likewise except that it finds successively
  1062. more recent shell commands from the buffer.
  1063.  
  1064.    The history search commands `M-r' and `M-s' read a regular
  1065. expression and search through the history for a matching command.  Aside
  1066. from the choice of which command to fetch, they work just like `M-p'
  1067. and `M-r'.  If you enter an empty regexp, these commands reuse the same
  1068. regexp used last time.
  1069.  
  1070.    When you find the previous input you want, you can resubmit it by
  1071. typing RET, or you can edit it first and then resubmit it if you wish.
  1072.  
  1073.    These commands get the text of previous shell commands from a special
  1074. history list, not from the shell buffer itself.  Thus, editing the shell
  1075. buffer, or even killing large parts of it, does not affect the history
  1076. that these commands access.
  1077.  
  1078.    Some shells store their command histories in files so that you can
  1079. refer to previous commands from previous shell sessions.  Emacs reads
  1080. the command history file for your chosen shell, to initialize its own
  1081. command history.  The file name is `~/.bash_history' for bash,
  1082. `~/.sh_history' for ksh, and `~/.history' for other shells.
  1083.  
  1084. 
  1085. File: emacs,  Node: Shell History Copying,  Next: History References,  Prev: Shell Ring,  Up: Shell History
  1086.  
  1087. Shell History Copying
  1088. .....................
  1089.  
  1090. `C-c C-p'
  1091.      Move point to the previous prompt (`comint-previous-prompt').
  1092.  
  1093. `C-c C-n'
  1094.      Move point to the following prompt (`comint-next-prompt').
  1095.  
  1096. `C-c RET'
  1097.      Copy the input command which point is in, inserting the copy at
  1098.      the end of the buffer (`comint-copy-old-input').  This is useful
  1099.      if you move point back to a previous command.  After you copy the
  1100.      command, you can submit the copy as input with RET.  If you wish,
  1101.      you can edit the copy before resubmitting it.
  1102.  
  1103.    Moving to a previous input and then copying it with `C-c RET'
  1104. produces the same results--the same buffer contents--that you would get
  1105. by using `M-p' enough times to fetch that previous input from the
  1106. history list.  However, `C-c RET' copies the text from the buffer,
  1107. which can be different from what is in the history list if you edit the
  1108. input text in the buffer after it has been sent.
  1109.  
  1110. 
  1111. File: emacs,  Node: History References,  Prev: Shell History Copying,  Up: Shell History
  1112.  
  1113. Shell History References
  1114. ........................
  1115.  
  1116.    Various shells including csh and bash support "history references"
  1117. that begin with `!' and `^'.  Shell mode can understands these
  1118. constructs and perform the history substitution for you.  If you insert
  1119. a history reference and type TAB, this searches the input history for a
  1120. matching command, performs substitution if necessary, and places the
  1121. result in the buffer in place of the history reference.  For example,
  1122. you can fetch the most recent command beginning with `mv' with `! m v
  1123. TAB'.  You can edit the command if you wish, and then resubmit the
  1124. command to the shell by typing RET.
  1125.  
  1126.    History references take effect only following a shell prompt.  The
  1127. variable `shell-prompt-pattern' specifies how to recognize a shell
  1128. prompt.  Comint modes in general use the variable
  1129. `comint-prompt-regexp' to specify how to find a prompt; Shell mode uses
  1130. `shell-prompt-pattern' to set up the local value of
  1131. `comint-prompt-regexp'.
  1132.  
  1133.    Shell mode can optionally expand history references in the buffer
  1134. when you send them to the shell.  To request this, set the variable
  1135. `comint-input-autoexpand' to `input'.
  1136.  
  1137.    You can make SPC perform history expansion by binding SPC to the
  1138. command `comint-magic-space'.
  1139.  
  1140. 
  1141. File: emacs,  Node: Shell Options,  Next: Remote Host,  Prev: Shell History,  Up: Shell
  1142.  
  1143. Shell Mode Options
  1144. ------------------
  1145.  
  1146.    If the variable `comint-scroll-to-bottom-on-input' is non-`nil',
  1147. insertion and yank commands scroll the selected window to the bottom
  1148. before inserting.
  1149.  
  1150.    If `comint-scroll-show-maximum-output' is non-`nil' (which is the
  1151. default), then scrolling due to arrival of output tries to place the
  1152. last line of text at the bottom line of the window, so as to show as
  1153. much useful text as possible.  (This mimics the scrolling behavior of
  1154. many terminals.)
  1155.  
  1156.    By setting `comint-scroll-to-bottom-on-output', you can opt for
  1157. having point jump to the end of the buffer whenever output arrives--no
  1158. matter where in the buffer point was before.  If the value is `this',
  1159. point jumps in the selected window.  If the value is `all', point jumps
  1160. in each window that shows the comint buffer.  If the value is `other',
  1161. point jumps in all nonselected windows that show the current buffer.
  1162. The default value is `nil', which means point does not jump to the end.
  1163.  
  1164.    The variable `comint-input-ignoredups' controls whether successive
  1165. identical inputs are stored in the input history.  A non-`nil' value
  1166. means to omit an input that is the same as the previous input.  The
  1167. default is `nil', which means to store each input even if it is equal
  1168. to the previous input.
  1169.  
  1170.    Three variables customize file name completion.  The variable
  1171. `comint-completion-addsuffix' controls whether completion inserts a
  1172. space or a slash to indicate a fully completed file or directory name
  1173. (non-`nil' means do insert a space or slash).
  1174. `comint-completion-recexact', if non-`nil', directs TAB to choose the
  1175. shortest possible completion if the usual Emacs completion algorithm
  1176. cannot add even a single character.  `comint-completion-autolist', if
  1177. non-`nil', says to list all the possible completions whenever
  1178. completion is not exact.
  1179.  
  1180.    The command `comint-dynamic-complete-variable' does variable name
  1181. completion using the environment variables as set within Emacs.  The
  1182. variables controlling filename completion apply to variable name
  1183. completion too.  This command is normally available through the menu
  1184. bar.
  1185.  
  1186.    Command completion normally considers only executable files.  If you
  1187. set `shell-command-execonly' to `nil', it considers nonexecutable files
  1188. as well.
  1189.  
  1190.    You can now configure the behavior of `pushd'.  Variables control
  1191. whether `pushd' behaves like `cd' if no argument is given
  1192. (`shell-pushd-tohome'), pop rather than rotate with a numeric argument
  1193. (`shell-pushd-dextract'), and only add directories to the directory
  1194. stack if they are not already on it (`shell-pushd-dunique').  The
  1195. values you choose should match the underlying shell, of course.
  1196.  
  1197.